Skip to content

Fix Lodash not loading from unpkg #1082

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Fix Lodash not loading from unpkg #1082

wants to merge 1 commit into from

Conversation

trevorstacy
Copy link

@trevorstacy trevorstacy commented Aug 16, 2017

For some reason, unpkg is not loading lodash.min.js, which is breaking the question example for watchers on the computed properties page. I've checked the .min links for axios and vue on unpkg, and it looks like it is just an issue with lodash. For example https://unpkg.com/lodash@4.13.1/lodash.min.js will return an error saying

Cannot find file "/lodash.min.js" in package lodash@4.13.1

Going to https://unpkg.com/lodash@4.17.4/lodash.min.js results in the same error but with the 4.17.4 tag.

I have checked the directories on unpkg and they are listed as being there. Someone may want to get in contact with unpkg to let them know this, as for now I've suggested to use cdnjs for the lodash@4.13.1 min.js file which fixes the error the computed properties page was getting (_ is not defined).

For some reason, unpkg is not loading lodash.min.js, which is breaking the question example for watchers on the computed properties page. I've checked the .min links for axios and vue on unpkg, and it looks like it is just an issue with lodash. For example https://unpkg.com/lodash@4.13.1/lodash.min.js will return an error saying

> Cannot find file "/lodash.min.js" in package lodash@4.13.1

Going to https://unpkg.com/lodash@4.17.4/lodash.min.js results in the same error but with the 4.17.4 tag.

I have checked the directories on unpkg and they are listed as being there. Someone may want to get in contact with unpkg to let them know this, as for now I've suggested to use cdnjs for the lodash@4.17.4 min.js file which fixes the error the computed properties page was getting (_ is not defined).
@jimaek
Copy link

jimaek commented Aug 16, 2017

How about using jsDelivr instead? It can also pull from npm and can offer better reliability because it uses multiple CDNs.

https://cdn.jsdelivr.net/npm/lodash@4.17.4/lodash.min.js
https://cdn.jsdelivr.net/npm/lodash@4.17/lodash.min.js

@chrisvfritz
Copy link
Contributor

We actually used to use jsDelivr for everything, but moved to unpkg to be able to use specific builds. Now that jsDeliver can do that too, I've moved all non-Vue CDN links back there and may soon update the Vue links as well.

@trevorstacy
Copy link
Author

Thanks Chris, the translated sites also use unpkg, so you may want to change those over to jsDelivr!

@jimaek
Copy link

jimaek commented Aug 16, 2017

Awesome. Let me know if you need anything, I will be glad to help out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants